package com.wuyou.dubboconsumer.controller;

import com.wuyou.dubbocommon.DubboDemoService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * DubboTestController
 *
 * @Date 2025/5/23 14:35
 * @Author 无忧
 */
@RestController
@RequestMapping(value = "/test")
public class DubboTestController {

    @DubboReference(check = false)
    private DubboDemoService dubboDemoService;

    @GetMapping(value = "/{name}")
    public String hello(@PathVariable String name){
        return dubboDemoService.sayHello(name);
    }
}
